<template>
	<uni-popup ref="popupInbo" type="center">
		<order-popup-common morenWidth="660"  title="投资人收件信息" @closePop="closePop('popupInbo')">
			<view slot="popup-con" v-if="Object.keys(infoInbo).length > 0">
				<view class="od-box">
					<view class="od-item">
						<view class="item-tip">名称</view>
						<view class="item-right">
							<view class="item-txt">{{ infoInbo.name }}</view>
						</view>
					</view>
					<view class="od-item">
						<view class="item-tip">邮寄地址</view>
						<view class="item-right">
							<view class="item-txt">{{ infoInbo.province + infoInbo.city + infoInbo.country }}</view>
						</view>
					</view>
					<view class="od-item">
						<view class="item-tip">详细地址</view>
						<view class="item-right">
							<view class="item-txt">{{ infoInbo.address }}</view>
						</view>
					</view>
					<view class="od-item">
						<view class="item-tip">联系电话</view>
						<view class="item-right">
							<view class="item-txt">{{ infoInbo.tel }}</view>
						</view>
					</view>
					<view class="od-item zdycss">
						<button class="btn" @click="closePops">一键复制信息</button>
					</view>
				</view>
			</view>
			<view style="padding: 30rpx;" slot="popup-con" v-else>暂无投资人收件信息</view>
		</order-popup-common>
	</uni-popup>
</template>

<script>
export default {
	props: ['infoInbo'],
	data() {
		return {};
	},
	created() {},
	methods: {
		closePops(){
			let datas= '名称:'+this.infoInbo.name+' '+'邮寄地址:'+this.infoInbo.province+this.infoInbo.city+this.infoInbo.country+' '+'详细地址:'+this.infoInbo.address+' '+'联系电话:'+this.infoInbo.tel
			uni.setClipboardData({
				data: datas,
				success: function () {
					uni.showToast({
						title: '复制成功',
					});
				},
				fail:function () {
					uni.showToast({
						title: '复制失败',

					});
				}
			});
			this.closePop('popupInbo')
		}
	}
};

</script>

<style lang="scss">
	.zdycss{
		margin: 12px 0 5px;
		.btn{
			background-color: #FFC801;
			color: #FFFFFF;
		}
	}
	.item-tip{
		margin-top: 10rpx;
	}
</style>
